import Vue from 'vue'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import moment from 'moment/moment.js'
import '@/styles/index.scss' // global css
import '@/assets/iconfont/iconfont.css' // global css
// import i18n from './lang' // Internationalization
import App from './App'
import router from './router'
import store from './store'
import '@/icons' // icon
import '@/utils/errorLog' // error log
import global_ from '@/utils/Global' // 引用模块进来
// import '@/utils/permission' // permission control
import qs from 'qs'
// import Blob from '@/vendor/Blob.js'
// import Export2Excel from '@/vendor/Export2Excel.js'
import Print from 'vue-print-nb'
// import 'quill/dist/quill.core.css'
// import 'quill/dist/quill.snow.css'
import VueRouter from 'vue-router'

import '../static/css/global.scss'//全局样式
import dataV from '@jiaminghi/data-view'


// import Print from '@/utils/Print'

// import 'quill/dist/quill.bubble.css'
window.author = 'yangqiong'


Vue.use(dataV)
Vue.use(Print);  //注册打印
Vue.use(ElementUI, {
    size: 'medium' //, // set element-ui default size
})

Vue.prototype.moment = moment
Vue.prototype.Global = global_
Vue.config.productionTip = false
Vue.prototype.$qs = qs

Vue.filter('moment', function (value, formatString) {
    formatString = formatString || 'YYYY-MM-DD HH:mm'
    return value ? moment(value).format(formatString) : ''
})
new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')
const routerPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
    return routerPush.call(this, location).catch(error=> error)
}
